package com.wuli.auth.service;

import com.wuli.auth.entity.User;
import com.wuli.auth.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.crypto.Data;
import java.util.Date;

@Service
public class UserService {

    @Autowired
    UserMapper userMapper;
    public User GetUserByPhone(String phone) {
        return userMapper.GetUserByPhone(phone);
    }

    public void Update(User user) {
        userMapper.Update(user);
    }

    public void Add(User user) {
        userMapper.Add(user);
    }

    public void UpdateToken(User user) {
        userMapper.UpdateToken(user);
    }

    public void UpdateUserRole(Integer id, Integer roleId) {
        userMapper.UpdateUserRole(id,roleId);
    }
}
